﻿using System;
using System.Data;
using System.IO;
using System.Linq;
using System.Text;
using ZHDJ.Data.BLL;
using ZHDJ.Data.Models.Common;
using ZHDJ.Data.Models.Org;
using ZHDJ.WebPage;

namespace ZHDJ.Web.Portal.Score
{
    public partial class PartyObjectScoreRuleDescPage : PortalPage
    {

        private string _id
        {
            get
            {
                return this.Request["id"] ?? "";
            }
        }

        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                CheckLogin(true, true);
                LoadData();
            }
        }

        /// <summary>
        /// LoadData
        /// </summary>
        private void LoadData()
        {
            CheckLogin(true);
            int idd = Convert.ToInt32(_id);
            IQueryable<PartyObjectScoreRuleDesc> model = DB.PartyObjectScoreDescs.Where(a=>a.OrderBy== idd);
            if (model.Count() > 0)
            {
                StringBuilder sbContent = new StringBuilder();
                foreach (PartyObjectScoreRuleDesc item in model)
                {
                    sbContent.Append(item.Content + ",");
                }
                liContent.Text = sbContent.ToString().TrimEnd(',');
            }
            
        }
    }
}